﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
    <xsl:output method="xml" indent="yes"/>
<!--
Sample Input:
Param: a - appName (short)
       v - version
       
<GIUpdateRequest>
  <a>
    <Value>giv</Value>
  </a>
  <v>
    <Value>1.0.0.0</Value>
  </v>
</GIUpdateRequest>
-->
    <xsl:template match="GIUpdateRequest">
      <xsl:choose>
        <xsl:when test="a = 'giv' and v !='1.1.0.0'">
          <GIUpdateResponse>
            <ActionCode>upgrade</ActionCode>
            <Tasks><!-- these nodes won't matter -->
              <Task type="download" toLocation="$MyDocuments\GIVisualEditor\">http://grammarintelliforjs.codeplex.com/releases/view/60237</Task>
            </Tasks>
          </GIUpdateResponse>
        </xsl:when>
        <xsl:otherwise>
          <GIUpdateResponse>
            <ActionCode>None</ActionCode>
          </GIUpdateResponse>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:template>
</xsl:stylesheet>
